﻿CREATE PROCEDURE [dbo].[sp_public_getNewsByCategory]
	@Category int
AS
SELECT News_Items.Item_Id, News_Items.Item_Author, News_Items.Item_Date, News_Items.Item_Headline, News_Items.Item_Body, Members.Member_MainCharacter, Characters.Character_Name
FROM Characters INNER JOIN Members ON Characters.Character_MemberId = Members.Member_Id CROSS JOIN News_Items
WHERE (News_Items.Item_Active = 'True') AND (Characters.Character_Id = Members.Member_MainCharacter) AND (News_Items.Item_Category = @Category)
ORDER BY News_Items.Item_Date DESC
RETURN 0